package net.llz.command;

public class AppInvoker {

    private Command onCommand;
    private Command offCommand;

    private Command coolCommand;
    private Command warmCommand;


    public void setOnCommand(Command onCommand) {
        this.onCommand = onCommand;
    }

    public void setOffCommand(Command offCommand) {
        this.offCommand = offCommand;
    }

    public void setCoolCommand(Command coolCommand) {
        this.coolCommand = coolCommand;
    }

    public void setWarmCommand(Command warmCommand) {
        this.warmCommand = warmCommand;
    }


    /**
     * 开机
     */
    public void on(){
        onCommand.execute();
    }

    /**
     * 关机
     */
    public void off(){
        offCommand.execute();
    }

    public void warm(){
        warmCommand.execute();
    }

    public void cool(){
        coolCommand.execute();
    }
}
